package com.ebraga.trackerclub.android.dao.api;

import java.util.List;

import com.ebraga.trackerclub.android.dao.entity.ChronometerAndroid;
import com.ebraga.trackerclub.android.exception.BackofficeDBConnectionException;
import com.ebraga.trackerclub.android.exception.dao.BackofficeDaoException;

public interface ChronometerDao {
	
	/**
	 * Insert User in the local database android
	 * 
	 * @param ChronometerAndroid
	 * @throws BackofficeDBConnectionException
	 * @throws BackofficeDaoException 
	 */
	void insert(ChronometerAndroid chronometerAndroid) throws BackofficeDBConnectionException, BackofficeDaoException;
	
	/**
	 * Return pending chronometerAndroid from local database android.
	 * 
	 * @throws BackofficeDBConnectionException
	 * @throws BackofficeDaoException
	 */
	List<ChronometerAndroid> retrieveChornometersToSync() throws BackofficeDBConnectionException, BackofficeDaoException;
	

	/**
	 * Return chronometerAndroid from local database android.
	 * 
	 * @throws BackofficeDBConnectionException
	 * @throws BackofficeDaoException
	 */
	List<ChronometerAndroid> list() throws BackofficeDBConnectionException, BackofficeDaoException;	
	
	/**
	 * Mark all given chronometerAndroid data as synchronized updating synchronization date with current date time;
	 * 
	 * @param chronometerAndroidList chronometerAndroid list to be marked as synchronized
	 * @throws BackofficeDBConnectionException if occurs a data base connection error.
	 * @throws BackofficeDaoException if occurs another error.
	 */
	void markAsSynchronized(List<ChronometerAndroid> chronometerAndroidList) throws BackofficeDBConnectionException, BackofficeDaoException;
	
}
